package com.bugman.managed;

import com.bugman.entity.User;
import javax.annotation.PostConstruct;

/**
 *
 * @author Ediczech
 */
public class EditProfileBean extends BaseBean {

    private String password;
    private User user;

    @PostConstruct
    public void init() {
        user = getLoggedUser();
    }

    public String save() {
        userService.saveProfile(user);
        logger.info("Ulozeni profilu uzivatele " + user.getNick() + " probehlo v poradku.");
        return "success";
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
